//<%--子页面新增选项卡方法--%>
function intab(a, d) {
    var r = $,e = layui.setter,i = layui.element, n = layui.admin, t = n.tabsPage;
    var l, u = r("#LAY_app_tabsheader>li"), b = a.replace(/(^http(s*):)|(\?[\s\S]*$)/g, "");
    u.each(function(e) {
        var i = r(this)
            , n = i.attr("lay-id");
        n === a && (l = !0,
            t.index = e)
    }),
        d = d || "新标签页";
    var y = function() {
        i.tabChange("layadmin-layout-tabs", a),
            n.tabsBodyChange(t.index, {
                url: a,
                text: d
            })
    };
    if (e.pageTabs)
        l || (setTimeout(function() {
            r("#LAY_app_body").append(['<div class="layadmin-tabsbody-item layui-show">', '<iframe src="' + a + '" frameborder="0" class="layadmin-iframe"></iframe>', "</div>"].join("")),
                y()
        }, 10),
            t.index = u.length,
            i.tabAdd("layadmin-layout-tabs", {
                title: "<span>" + d + "</span>",
                id: a,
                attr: b
            }));
    else {
        var m = n.tabsBody(n.tabsPage.index).find(".layadmin-iframe");
        m[0].contentWindow.location.href = a
    }
    y()
}
//<%--子页面删除选项卡方法--%>
function detab(id) {
    layui.element.tabDelete('layadmin-layout-tabs', id);
}